<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="../../common/head_admin.jsp" %>
<link rel="stylesheet" type="text/css" href="../css/admin.css" />
<script type="text/javascript" src="../editor/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../editor/xheditor-zh-cn.min.js?v=1.0.0-final"></script>
<script src="${ctx }/common/js/checkChemInfo.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function(){
$.formValidator.initConfig({formid:"form1",onError:function(){alert("具体错误请看提示!")}});
		//点击获取脚本按钮，获取校验代码

$("#password1").formValidator({onshow:"请输入密码",onfocus:"密码不能为空",oncorrect:"密码合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},onerror:"密码不能为空,请确认"});

});	

</script>

<div class="headbar clearfix">
	<div class="position"><span>后台首页</span><span>></span><span>化合物管理</span><span>></span><span>新增化合物</span></div>
	<ul class="tab" name="menu1">
		<li id="li_1" class="selected"><a href="javascript:void(0)" hidefocus="true" onclick="select_tab('1')">基本信息</a></li>
		<li id="li_2"><a href="javascript:void(0)" hidefocus="true" onclick="select_tab('2')">理化性质</a></li>
		<li id="li_3"><a href="javascript:void(0)" hidefocus="true" onclick="select_tab('3')">合成与谱图</a></li>
		<li id="li_4"><a href="javascript:void(0)" hidefocus="true" onclick="select_tab('4')">其他信息</a></li>
	</ul>
</div>


<div class="content_box">
	<div class="content form_content">
	<form name="form1" id="form1" action="${ctx }/manage/chem/add.do" method="post" enctype="multipart/form-data">
			<div id="table_box_1">
			<table class="form_table">
				<col width="150px" />
				<col />
				<tr>
					<th>中文名称：</th>
					<td><input class="normal" name="name_cn" id="name_cn" type="text" value="" /><div id="name_cnTip" style="width:250px"></div></td>
					<td><font color="red">*化合物基本信息，必填</font></td>
				</tr>
				<tr>
					<th>英文名称：</th>
					<td><input class="normal" name="name_en" id="name_en" type="text" value="" /><label><span id="name_enTip" style="width:300px"></span></label></td>
					<td><font color="red">*化合物基本信息，必填</font></td>
				</tr>
				
				<tr>
					<th>分子式：</th>
					<td><input class="normal" name="molecular_formula" id="molecular_formula" type="text" value="" /><label><span id="molecular_formulaTip" style="width:300px"></span></label></td>
					<td><font color="red">*化合物基本信息，必填</font></td>
				</tr>
				<tr>
					<th>CAS：</th>
					<td><input class="normal" name="cas_rn" id="cas_rn" type="text" value="" /><label><span id="cas_rnTip" style="width:300px"></span></label></td>
					<td><font color="red">*化合物基本信息，必填</font></td>
				</tr>
				
				<tr>
					<th>结构式图片：</th>
                    <td><input type="file" class="middle"  name="picture" id="picture_Name"/></td>
				</tr>
				<tr>
					<th>分子量：</th>
                    <td><input class="normal" name="molecularWeight" id="molecularWeight" type="text" value="" /></td>
				</tr>
				<tr>
					<th>所属类别：</th>
                    <td><input class="normal" name="scr_type" id="scr_type" type="text" value="" /></td>
				</tr>
				<tr>
					<th>化合物用途：</th>
                    <td><textarea name="scr_usage" name="scr_usage" class="xheditor-simple" style="width:530px;height:250px;" ></textarea></td>
				</tr>
			</table>
			</div>
			<div id="table_box_2" cellpadding="0" cellspacing="0" style="display:none">
				<table class="form_table">
					<col width="150px" />
					<col />
					<tr>
						<th>理化性质：</th>
						<td><textarea name="physicochemical_property" name="physicochemical_property" class="xheditor-simple" style="width:530px;height:250px;visibility:hidden;"></textarea></td>
					</tr>
				</table>
			</div>
			<div id="table_box_3" cellpadding="0" cellspacing="0" style="display:none">
				<table class="form_table">
					<col width="150px" />
					<col />
					<tr>
						<th>合成方法：</th><td><textarea name="synthetic_method" class="xheditor-simple" style="width:530px;height:250px;visibility:hidden;"></textarea></td>
					</tr>
					<tr>
						<th>质谱谱图：</th><td><input type="file" class="normal"  name="mass_spectrum_file" id="mass_spectrum"/></td>
					</tr>
					<tr>
						<th>红外谱图：</th><td><input type="file" class="normal"  name="infrared_file" id="infrared"/></td>
					</tr>
					<tr>
						<th>核磁谱图：</th><td><input type="file" class="normal"  name="nuclear_file" id="nuclear" /></td>
					</tr>
                    <tr><td height="40"></td></tr>
                    <tr>
						<th>其他信息：</th><td><textarea name="tupu_otherInfo" class="xheditor-simple" style="width:530px;height:250px;visibility:hidden;"></textarea></td>
					</tr> 
				</table>
			</div>

			<div id="table_box_4" cellpadding="0" cellspacing="0" style="display:none">
				<table class="form_table">
					<col width="150px" />
					<col />
					<tr>
						<th>毒性与生物活性：</th>
                        <td><textarea name="toxicity_biological" class="xheditor-simple" style="width:530px;height:250px;visibility:hidden;" ></textarea></td>
					</tr>
					<tr>
						<th>预防与急救：</th>
                        <td><textarea name="prevention_emergency" class="xheditor-simple" style="width:530px;height:200px;visibility:hidden;" ></textarea></td>
					</tr>
 					<tr>
						<th>标准和专利：</th>
                        <td><textarea name="#" class="xheditor-simple" style="width:530px;height:150px;visibility:hidden;" ></textarea></td>
					</tr>
                    <tr>
						<th>其他信息：</th>
                        <td><textarea name="other_info" class="xheditor-simple" style="width:530px;height:250px;visibility:hidden;" ></textarea></td>
					</tr>
				</table>
			</div>
			<table class="form_table">
				<col width="150px" />
				<col />
				<tr>
					<td></td><td><button class="submit"  type="submit" onclick="return checkForm()"><span>新增信息</span></button></td>
				</tr>
			</table>
		</form>
	</div>
</div>
</div>
	<div id="separator"></div>
</div>
<script type='text/javascript'>
	//隔行换色
	$(".list_table tr::nth-child(even)").addClass('even');
	$(".list_table tr").hover(
		function () {
			$(this).addClass("sel");
		},
		function () {
			$(this).removeClass("sel");
		}
	);
</script>
</body>
</html>
<script type='text/javascript'>
	function select_tab(curr_tab)
	{
		$("form[name='form1'] > div").hide();
		$("#table_box_"+curr_tab).show();
		$("ul[name=menu1] > li").removeClass('selected');
		$('#li_'+curr_tab).addClass('selected');
	}
</script>